<%--
  Created by IntelliJ IDEA.
  User: 10330
  Date: 2021/6/28
  Time: 14:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@include file="/pages/common/header.jsp"%>

<%--图片轮播--%>
<div class="row clearfix">
    <div class="col-md-12">

        <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                <li data-target="#carousel-example-generic" data-slide-to="2"></li>
            </ol>

            <!-- Wrapper for slides -->
            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <img src="${pageContext.request.contextPath}/images/adver/1.jpg" alt="...">
                    <div class="carousel-caption"></div>
                </div>
                <div class="item">
                    <img src="${pageContext.request.contextPath}/images/adver/ad5.jpg" alt="...">
                    <div class="carousel-caption"></div>
                </div>
                <div class="item">
                    <img src="${pageContext.request.contextPath}/images/adver/ad7.jpg" alt="...">
                    <div class="carousel-caption"></div>
                </div>
            </div>

            <!-- Controls -->
            <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
        </div>


    </div>
</div>

<%--今日推荐--%>
<div class="row clearfix">
    <div class="col-md-2">
        <%--            <div class="thumbnail">--%>
        <div class="thumbnail today-style">
            <div class="caption"><h3>今日推荐</h3></div>
            <img style="height: 75px;" src="${pageContext.request.contextPath}/images/goods/2016.png">
        </div>
    </div>

    <c:forEach items="${requestScope.get('todayGoodsList')}" var="goods" varStatus="goodsList">
        <c:if test="${goodsList.count<=5}">
            <div class="col-md-2">
                <a href="${pageContext.request.contextPath}/goods?action=goodsDetail&goodsId=${goods.goods_id}">
                <div class="thumbnail todaygoods">
                    <img src="${pageContext.request.contextPath}${goods.goods_pic}">
                    <div>
                        <h4 class="font-red">￥ ${goods.goods_price}</h4>
                            ${goods.goods_name}
                    </div>
                </div>
                </a>
            </div>
        </c:if>
    </c:forEach>
</div>

<%--    商品展示--%>
<div class="row">

    <c:forEach items="${requestScope.get('categoryDetailList')}" var="categoryDetail">
        <div class="col-md-12">
            <div class="navtitle">
                <span class="cate-title">${categoryDetail.cate_name}</span>
                <small>${categoryDetail.cate_desc}</small>
                <a class="btn btn-default btn-xs pull-right btn-more"  href="#" role="button">更多商品</a>
                <ul class="list-inline pull-right cate-ul">
                    <c:forEach items="${categoryDetail.childList}" var="child">
                        <li><a href="#">${child.childName}</a></li>
                    </c:forEach>

                </ul>
            </div>
        </div>
        <c:forEach items="${categoryDetail.goodsList}" var="goods" varStatus="goodsList">
            <c:if test="${goodsList.count<=6}">
                <div class="col-md-2">
                    <a href="${pageContext.request.contextPath}/goods?action=goodsDetail&goodsId=${goods.goods_id}">
                        <div class="thumbnail homegoods">
                            <img src="${pageContext.request.contextPath}${goods.goods_pic}">
                            <div class="caption caption-style">
                                <p>${goods.goods_name}</p>
                                <p class="font-red">￥ ${goods.goods_price}</p>
                            </div>
                        </div>
                    </a>
                </div>
            </c:if>
        </c:forEach>
    </c:forEach>

</div>

<div class="row">
    <div class="col-md-12">

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">热销商品</h3>
            </div>
            <div class="panel-body">
                <c:forEach items="${hotGoodsList}" var="hotGoods" varStatus="goodsList">
                    <div class="col-md-2">
                        <div class="thumbnail homegoods">
                            <img src="${pageContext.request.contextPath}${hotGoods.goods_pic}">
                            <div class="caption caption-style">
                                <p>${hotGoods.goods_name}</p>
                                <p class="font-red">￥ ${hotGoods.goods_price}</p>
                            </div>
                        </div>
                    </div>
                </c:forEach>
            </div>
        </div>

    </div>
</div>

<%--热销商品--%>

<%@include file="/pages/common/footer.jsp"%>